﻿using BussinesLayer.Services;
using Microsoft.AspNet.SignalR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Mvc4.Hubs
{
    public class FriendSitesHub : Hub
    {
        private SiteServices ss = new SiteServices();

        public void AddFriendSite(int siteId, string name, string url, string keyword)
        {
            int fsId = ss.AddFriendSite(siteId, name, url, keyword);

            Clients.Caller.ConfirmAddFriendSite(fsId);
        }

        public void EditFriendSite(int fsId, string name, string url, string keyword)
        {
            ss.ModifyFriendSite(fsId, name, url, keyword);

            //Clients.Caller.ConfirmEditFriendSite();
        }

        public bool DeleteFriendSite(int fsId)
        {
            ss.DeleteFriendSite(fsId);

            return true;
            //Clients.Caller.ConfirmDeleteFriendSite();
        }
    }
}